package com.demo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * <p>
 * 设备数据表
 * </p>
 *
 * @author 马磊
 * @since 2023-02-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)//内容样式
public class ExcelData extends Model<ExcelData> {

    @ColumnWidth(15)
    @ExcelProperty("设备id")
    private String equipmentId;

    @ColumnWidth(15)
    @ExcelProperty("天线号")
    private Integer antennaNo;

    @ColumnWidth(15)
    @ExcelProperty("设备号")
    private String deviceNo;

    @ColumnWidth(15)
    @ExcelProperty("信号强度")
    private String rssi;

    @ColumnWidth(20)
    @ExcelProperty("IP或串口号")
    private String communicationMode;

    @ColumnWidth(15)
    @ExcelProperty("私有数据")
    private String privateData;

    @ColumnWidth(15)
    @ExcelProperty("温度值")
    private String temperature;

    @ColumnWidth(30)
    @DateTimeFormat("yyyy年MM月dd日 HH时mm分ss秒")
    @ExcelProperty("时间戳")
    private LocalDateTime timeStamp;

    @ColumnWidth(15)
    @ExcelProperty("标签类型")
    private Integer tagType;

    @ColumnWidth(15)
    @ExcelProperty("用户数据")
    private String userData;

    @ColumnWidth(15)
    @ExcelProperty("报警值")
    private Integer alarm;


}
